package com.hgh.javase4_1;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateTest {

	public static void main(String[] args) {
		Date date = new Date(2014, 1, 2, 3, 1);
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		System.out.println(simpleDateFormat.format(date));
		Date date2 = new Date(System.currentTimeMillis());
		System.out.println(simpleDateFormat.format(date2));
		//3914-02-02 03:01:00
		//2017-03-18 01:08:33
	}
}
